{include file=member.header.html}
{include file="title.html"}
{include file=member.submenu.html}


<script>
$(function(){
	$("#refund_form").submit(function(){
		var re = /^[0-9]+.?[0-9]*$/;   //判断字符串是否为数字  
     	if (($('input[name="refund_goods_fee"]').val() !='' && !re.test($('input[name="refund_goods_fee"]').val())) || ($('input[name="refund_shipping_fee"]').val() !='' && !re.test($('input[name="refund_shipping_fee"]').val())))
    	{
        	alert("{$lang.price_error}");
        	return false;
     	}
	 
		if($('input[name="refund_goods_fee"]').val()<0 || $('input[name="refund_goods_fee"]').val()==''){
			alert('{$lang.refund_fee_ge0}');
			return false;
		} else if($('input[name="refund_goods_fee"]').val() > {$refund.goods_fee}){
			alert('{$lang.refund_fee_gt_total_fee}:{$refund.goods_fee}');
			return false;
		}
		if($('input[name="refund_shipped"]:checked').val() =='' || $('input[name="refund_shipped"]:checked').val() == undefined){
			alert('{$lang.select_refund_shipped}');
			return false;
		}
		if($('input[name="refund_shipping_fee"]').val()<0){
			alert('{$lang.refund_shipping_fee_ge0}');
			return false;
		} else if($('input[name="refund_shipping_fee"]').val() > {$refund.shipping_fee}){
			alert('{$lang.refund_shipping_fee_error}:{$refund.shipping_fee}');
			return false;
		}
		
		if($('select[name="refund_reason"]').val()==''){
			alert('{$lang.select_refund_reason}');
			return false;
		}
	});	
});
</script>



<style>
    .refund_form .red_btn{font-size: 16px;cursor: pointer;margin-bottom:10px;}
</style>
    <form id="refund_form" method="post" enctype="multipart/form-data">
        <ul class="form_content refund_form">
            <li>
                <h3>{$lang.refund_money}:</h3>
                <p><input type="text" class="text" name="refund_goods_fee" id="refund_goods_fee" value="{$refund.refund_goods_fee}"/></p>
                <span class="gray">（{$lang.more}{$refund.goods_fee|price}{$lang.refund_fee_String}）</span>
            </li>
            <li>
                <h3>{$lang.receive_cond}</h3>
                <p>
                    <input type="radio" name="refund_shipped" value="{$lang.received_refund}" id="shipped_2" {if $refund.refund_shipped eq $lang.received_refund} checked="checked"{/if} /><label for="shipped_2">{$lang.received_refund}</label>
                </p>
                <p>
                    <input type="radio" name="refund_shipped" value="{$lang.no_refund_only}" id="shipped_1" class="ml10" {if $refund.refund_shipped eq $lang.no_refund_only} checked="checked"{/if}/><label for="shipped_1">{$lang.no_refund_only}</label>
                </p>
                <p>
                    <input type="radio" name="refund_shipped" value="{$lang.need_refund}" id="shipped_0" class="ml10" {if $refund.refund_shipped eq $lang.need_refund || !$refund.refund_shipped} checked="checked"{/if}/><label for="shipped_0">{$lang.need_refund}</label>
                </p>
            </li>
            <li>
                <h3>{$lang.back_money}:</h3>
                <p><input type="text" class="text" name="refund_shipping_fee" id="refund_shipping_fee" value="{$refund.refund_shipping_fee}"/></p>
                <span class="gray">（{$lang.more}{$refund.shipping_fee}{$lang.yuan}，{$lang.Share_trip}）</span>
            </li>
            <li>
                <h3>{$lang.refund_reason}:</h3>
                <p>
                    <select class="text" name="refund_reason" style="background:none">
                        <option value="" selected="selected">{$lang.pls_select_reason}</option>
                        <option value="{$lang.out_of_stock}" {if $refund.refund_reason eq $lang.out_of_stock} selected="selected"{/if}>{$lang.out_of_stock}</option>
                        <option value="{$lang.failling_time}" {if $refund.refund_reason eq $lang.failling_time} selected="selected"{/if}>{$lang.failling_time}</option>
                        <option value="{$lang.receive_fake}" {if $refund.refund_reason eq $lang.receive_fake} selected="selected"{/if}>{$lang.receive_fake}</option>
                        <option value="{$lang.receive_fake}" {if $refund.refund_reason eq $lang.receive_fake} selected="selected"{/if}>{$lang.receive_fake}</option>
                        <option value="{$lang.goods_wrong}" {if $refund.refund_reason eq $lang.goods_wrong} selected="selected"{/if}>{$lang.goods_wrong}</option>
                        <option value="{$lang.goods_damaged}" {if $refund.refund_reason eq $lang.goods_damaged} selected="selected"{/if}>{$lang.goods_damaged}</option>
                        <option value="{$lang.goods_not_like}" {if $refund.refund_reason eq $lang.goods_not_like} selected="selected"{/if}>{$lang.goods_not_like}</option>
                        <option value="{$lang.other}" {if $refund.refund_reason eq $lang.other} selected="selected"{/if}>{$lang.other}</option>
                    </select>
                </p>
            </li>
            <li>
                <h3>{$lang.refund_instruction}</h3>
                <p>
                    <textarea name="refund_desc" class="textarea" rows="5" style=" background:none;">{$refund.refund_desc}</textarea>
                </p>
            </li>
            <li>
                <input class="red_btn" type="submit" value="{if $smarty.get.act eq 'edit'}{$lang.modify}{else}{$lang.submit}{/if}{$lang.apply}" />
            </li>
        </ul>
    </form>





{include file=footer.html}